package com.jframe.sys.controller.utils;

import com.jframe.sys.utils.*;

public class SysConfig {

	private static String unFilterUrl = "";
	private static String redirectUrl = "";
	private static String unStaticUrl = "";
	private static String encoding = "UTF-8";
	private static String errPage401 = "";
	private static String errPage404 = "";
	private static String errPage500 = "";
	private static String errNologin = "";
	private static String logoutPage="login.jsp";
	private static String indexLoginPage = "";
	private static String staticJspPage ="true";
	
	static{
		String path = "/"+StringUtil.getPrjAbsolutePath()+ "WEB-INF/classes/"; //linux
		PropertiesUtil prop = new PropertiesUtil(path+"sys-config.properties");
		redirectUrl = prop.getKeyValue("redirectURL");
		unFilterUrl = prop.getKeyValue("unFilterURL");
		unStaticUrl = prop.getKeyValue("unStaticUrl");
		encoding = prop.getKeyValue("encoding");
		errPage401 = prop.getKeyValue("errPage401");
		errPage404 = prop.getKeyValue("errPage404");
		errPage500 = prop.getKeyValue("errPage500");
		errNologin = prop.getKeyValue("errNologin");
		logoutPage = prop.getKeyValue("logoutPage");
		indexLoginPage = prop.getKeyValue("indexLoginPage");
		staticJspPage=  prop.getKeyValue("staticJspPage");
	}
	
	
	public static String getUnFilterUrl() {
		return unFilterUrl;
	}
	public static String getRedirectUrl() {
		return redirectUrl;
	}
	public static String getUnStaticUrl() {
		return unStaticUrl;
	}
	public static String getEncoding() {
		return encoding;
	}
	public static String getErrPage401() {
		return errPage401;
	}
	public static String getErrPage404() {
		return errPage404;
	}
	public static String getErrPage500() {
		return errPage500;
	}
	public static String getErrNologin() {
		return errNologin;
	}
	public static String getLogoutPage() {
		return logoutPage;
	}
	public static String getIndexLoginPage() {
		return indexLoginPage;
	}
	public static String getStaticJspPage() {
		return staticJspPage;
	}
	

}
